using System; 
using System.Collections.Generic; 
using System.Text; 
using FluentNHibernate.Mapping;
using NH_Entity;

namespace NH_Map {
    
    
    public class QHY_UserMap : ClassMap<QHY_User> {
        
        public QHY_UserMap() {
			Table("QHY_Users");
			LazyLoad();
			Id(x => x.UserID).GeneratedBy.Identity().Column("UserID");
			Map(x => x.UserName).Column("UserName").Not.Nullable().Length(128);
			Map(x => x.Password).Column("Password").Not.Nullable().Length(128);
			Map(x => x.Email).Column("Email").Length(100);
			Map(x => x.Question).Column("Question").Length(100);
			Map(x => x.Answer).Column("Answer").Length(100);		
			Map(x => x.CreateTime).Column("CreateTime").Not.Nullable();
			Map(x => x.LastLoginTime).Column("LastLoginTime");
			Map(x => x.Status).Column("Status").Not.Nullable();
			Map(x => x.IsOnline).Column("IsOnline").Not.Nullable();
			Map(x => x.IsLimit).Column("IsLimit").Not.Nullable();
            HasMany(x => x.QHY_UserRoles).KeyColumn("UserID");
        }
    }
}
